<?php
$moduleName = $sf_context->getModuleName();
$activeSeasonId = $sf_user->getAttribute('activeSeasonId', 'home');

$activeSeasonIdSpriteS = Doctrine::getTable('BbLeague')->getActiveSeasonId(1);
$activeSeasonIdSprite = Doctrine::getTable('BbLeague')->getActiveSeasonId(2);
$activeSeasonIdMnba = Doctrine::getTable('BbLeague')->getActiveSeasonId(3);
$sf_user->setAttribute('activeSeasonIdSpriteS', $activeSeasonIdSpriteS);
$sf_user->setAttribute('activeSeasonIdSprite', $activeSeasonIdSprite);
$sf_user->setAttribute('activeSeasonIdMnba', $activeSeasonIdMnba);
?>

<div id="menu-wrap">
<div id="menu">
<ul class="menuHoriz" id="main_nav">

  <li id="Home" class="<?php if($activeSeasonId == 'home') echo 'hover'?>">
      <a id="indexBtn" class="navBtn" href="<?php echo url_for('@homepage')?>">
        <span id="navlabel_coffee" class="navBtn_label">ЭХЛЭЛ</span>
        <span class="undertext">Тавтай морилно уу</span>
      </a>          
  </li>
  
  <li id="Menu" class="<?php if($activeSeasonId == 'tlg') echo 'hover'?>">
      <a id="tlg13Btn" class="navBtn" href="<?php echo url_for('main/tlg')?>">
        <span id="navlabel_menu" class="navBtn_label">TLG 13</span> 
        <span class="undertext">TLG 13 ТББ-н тухай</span>
      </a>
  </li>

  <li id="Stores" class="<?php if($activeSeasonId == $activeSeasonIdSpriteS) echo 'hover'?>">
      <a id="spriteDeedBtn" class="navBtn" href="<?php echo url_for('main/home?seasonId='.$activeSeasonIdSpriteS)?>">
        <span id="navlabel_stores" class="navBtn_label">SPRITE СУПЕР ЛИГ</span> 
        <span class="undertext">Sprite дээд лигийн мэдээлэл</span>
      </a>
  </li>
  
  <li id="Sprite" class="<?php if($activeSeasonId == $activeSeasonIdSprite) echo 'hover'?>">
    	<a id="spriteDevBtn" class="navBtn" href="<?php echo url_for('main/home?seasonId='.$activeSeasonIdSprite)?>">
      	<span id="navlabel_shop" class="navBtn_label">SPRITE ХӨГЖЛИЙН ЛИГ</span> 
      	<span class="undertext">Sprite хөгжлийн лигийн мэдээлэл</span>
    	</a>
  </li>  
  <li id="Card" class="<?php if($activeSeasonId == 'dream') echo 'hover'?>">
    	<a id="dreamBtn" class="navBtn" href="<?php echo url_for('main/dream')?>">
  	  	<span id="navlabel_ddcard" class="navBtn_label">МӨРӨӨДЛИЙН БАГ</span>
  	  	<span class="undertext">Мөрөөдлийн багийн мэдээлэл</span>
  	  </a>
  </li>
  
  <li id="Fantasy" class="<?php if($activeSeasonId == 'nbalounge') echo 'hover'?>">
    	<a id="fantasyBtn" class="navBtn" href="<?php echo url_for('main/nbalounge')?>">
    	 	<span class="navBtn_label" id="navlabel_perks">НБА Lounge</span> 
    	 	<span class="undertext">НБА Lounge-н хуудас</span>
   	  </a>
  </li> 
  
  <li id="Shop" class="<?php if($activeSeasonId == 'shop') echo 'hover'?>">
     	<a id="shopBtn" class="navBtn" href="<?php echo url_for('shop/')?>">
     		<span id="navlabel_perks" class="navBtn_label">ДЭЛГҮҮР</span> 
     		<span class="undertext">Онлайн дэлгүүр</span>
     	</a> 
  </li>

</ul><!--menuHoriz-->
</div><!--menu-->
</div><!--menu-wrap-->
<!-- END MENU -->

<br clear="all">

<div id="submenu">
  <?php
    if($activeSeasonId == 'home')
    {
        
    }
    elseif ($activeSeasonId == 'tlg')
    {
      echo link_to('Бидний Тухай', 'main/tlg?seasonId='.$activeSeasonId, array()).'|'; 
      echo link_to('Багууд', 'main/tlg?seasonId='.$activeSeasonId, array()).'|'; 
      echo link_to('Мэдээ', 'main/tlg?seasonId='.$activeSeasonId, array()).'|'; 
  	  echo link_to('Стат', 'main/tlg?seasonId='.$activeSeasonId, array());    
      echo link_to('Зургийн Цомог', 'main/tlg?seasonId='.$activeSeasonId, array()).'|';
      echo link_to('Форум', 'http://tlg13.mn/forum/index.php', array());
    }
    elseif ($activeSeasonId == 'shop')
    {
        echo link_to('Өмсгөл', 'shop/index?league=shop', array()).'|'; 
      	echo link_to('Туг', 'shop/index?league=shop', array()).'|'; 
      	echo link_to('Пүүз', 'shop/index?league=shop', array()).'|'; 
      	echo link_to('Шорт', 'shop/index?league=shop', array()).'|'; 
      	echo link_to('Хэрэгсэл', 'shop/index?league=shop', array()).'|'; 
      	echo link_to('Форум', 'http://tlg13.mn/forum/index.php', array());
    }
    elseif ($activeSeasonId == 'nbalounge')
    {
        echo link_to('Бидний Тухай', 'main/nbalounge?seasonId='.$activeSeasonId, array()).'|'; 
        echo link_to('Мэдээ', 'main/nbalounge?seasonId='.$activeSeasonId, array()).'|'; 
    }
    elseif ($activeSeasonId == 'dream')
    {
        
     echo link_to('Бидний Тухай', 'main/tlg?seasonId='.$activeSeasonId, array()).'|'; 
      echo link_to('Багууд', 'main/tlg?seasonId='.$activeSeasonId, array()).'|'; 
      echo link_to('Мэдээ', 'main/tlg?seasonId='.$activeSeasonId, array()).'|'; 
  	  echo link_to('Стат', 'main/tlg?seasonId='.$activeSeasonId, array());    
      echo link_to('Зургийн Цомог', 'main/tlg?seasonId='.$activeSeasonId, array()).'|';
     echo link_to('Форум', 'http://tlg13.mn/forum/index.php', array());
    }
    else {
      echo link_to('Эхлэл', 'main/home?seasonId='.$activeSeasonId, array()).'|'; 
      echo link_to('Багууд', 'team/index?seasonId='.$activeSeasonId, array()).'|'; 
      echo link_to('Тоглогчид', 'player/index?seasonId='.$activeSeasonId, array()).'|';
      echo link_to('Хүснэгт', 'standings/index?winorlose=win&order=des&seasonId='.$activeSeasonId, array()).'|'; 
      echo link_to('Хувиар, дүн', 'schedule/index?seasonId='.$activeSeasonId, array()).'|'; 
      echo link_to('Стат', 'stats/show?seasonId='.$activeSeasonId, array()).'|';
  	  echo link_to('Форум', 'http://tlg13.mn/forum/index.php', array());
    }
    

    if($moduleName == 'fantasy')
    {
       	echo link_to('Эхлэл', 'main/dream', array()).'|'; 
      	echo link_to('Баг', 'team/index?league=dream', array()).'|'; 
      	echo link_to('Тоглогчид', 'player/index?league=dream', array()).'|'; 
      	echo link_to('Хүснэгт', 'stat/index?league=dream', array()).'|'; 
      	echo link_to('Хувиар, дүн', 'stat/index?league=dream', array()).'|'; 
      	echo link_to('Стат', 'stat/index?league=dream', array());
    }    
  ?>
</div>

<br clear="all">